package com.example.bootintegration.dao.jpa.repository;

import java.util.Collection;
import java.util.List;

/**
 * @author T088391C
 * @date 2025/1/2
 */
public interface UpdateRepository<T, ID> {
    /**
     * update all field, if entity have version field, must be assign version
     * @param entities
     * @return
     */
    int update(Collection<? extends T> entities);

    /**
     * update custom field, not need version
     * @param entities
     * @param updateFields
     * @return
     */
    int update(Collection<? extends T> entities, List<String> updateFields);
}
